//
//  SenderButton.m
//  XiangMuB
//
//  Created by lanou3g on 16/8/12.
//  Copyright © 2016年 lanou3g. All rights reserved.
//

#import "SenderButton.h"

#import "UIView+FrameView.h"

@implementation SenderButton

- (instancetype)initWithFrame:(CGRect)frame{
    
    self = [super initWithFrame:frame];
    if (self) {
       
        self.titleLabel.textAlignment = NSTextAlignmentCenter;
        
    }
    return self;
}


- (void)layoutSubviews{
    
    [super layoutSubviews];
    
    self.imageView.x = 0;
    self.imageView.y = 0;
    self.imageView.width = self.width;
    self.imageView.height = self.imageView.width;
    
    self.titleLabel.x = 0;
    self.titleLabel.y = self.imageView.height;
    self.titleLabel.width = self.width;
    self.titleLabel.height = self.height - self.titleLabel.y;
    
    
    
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
